home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-04-29 | 1.9 KB | 41 lines | [TEXT/GEOL] |
- Item 0305537 15-April-91 10:12PDT
-
- From: V0678 AGFA Compugraphic, F Giuffrida,VAR
-
- To: MACDTS Macintosh Developer Tech Supt
- MACAPP.TECH$ MacApp Technical
-
- ------------------------------------------------------------------------------
-
- Sub: C++ and Trace switch problem
-
- I think I have found a problem in the interface between the toolbox and
- MacApp/CPlus when compiling with "trace on." I have looked through the MacApp
- release notes and Tech Note #280, but have seen no reference to this problem.
-
- The problem occurs when I attempt to select a substring in a TEditText view,
- i.e., select '23' in the view containing '1234'. When I compile with trace on,
- the program acts as if I had released the mouse button either immediately or
- after a 1/4 second or so.
-
- Looking at the MacApp code, the selection highlighting is handled by TEClick
- called from TTEView.DoMouseCommand. A ClikLoop has been setup to call the
- global function ClickLoopForTTEView. Per Inside Mac, this function must return
- TRUE or TEClick will assume that a mouseUp has occured and stop tracking, i.e.,
- the symptom I'm seeing.
-
- I looked at the assembler generated for this function and found a MOVE.B of the
- boolean return flag to the stack before returning. The caller, EPROM function
- ROM_TEClick, then checks the condition code 'Z' with a BEQ.S instruction rather
- than actually examining the return code.
-
- Unfortunately, the "-trace on" flag causes a call to %_EP to occur just before
- returning from ClickLoopForTTEView. This call changes the condition code 'Z'
- (based on the value of the preserved D7); therefore, the returned condition
- codes are invalid. Usually 'Z' is 0 upon returning to ROM_TEClick, and the
- branch is taken to terminate the selection operation.
-
- Mike Rubin
- Agfa Compugraphic
-
-